﻿--[[
	This file is part of FlexBar3.

	FlexBar3 is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	FlexBar3 is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with FlexBar3.  If not, see <http://www.gnu.org/licenses/>.
]]
-- Local upvalues
local select = select;
local FlexBar3 = FlexBar3;

function FlexBar3:Print(...)
	local Text = "FlexBar3: ";
	for Key = 1, select("#", ...) do
		Text = Text .. tostring(select(Key, ...));
	end
	ChatFrame1:AddMessage(Text);
end

-- Debugging is enabled by default for now
FlexBar3.Debugging = true;
function FlexBar3:Debug(...)
	if(self.Debugging) then
		FlexBar3:Print("Debug: ", ...);	
	end
end
